<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Language" content="{$language}" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
{php}
    if($type == 'index'){
        if($page == '1'){
                $ThisTitle = $zbp->name.' - '.$zbp->subname;
        }else{
                $ThisTitle = $zbp->name.' - '.'第'.$page.'页'.' - '.$zbp->subname;
        }
        $keywords = '';
        $description = '';
    }elseif($type == 'category'){
            if ($page=='1') {
                $ThisTitle = $zbp->title.' - '.$zbp->name;
            }else{
                $ThisTitle = $zbp->title.' - '.'第'.$page.'页'.' - '.$zbp->name;
            }
            $keywords = $category->Name;
            $description = $category->Intro;
    }elseif($type == 'tag'){
            if ($page=='1') {
                $ThisTitle = $zbp->title.' - '.$zbp->name;
            }else{
                $ThisTitle = $zbp->title.' - '.'第'.$page.'页'.' - '.$zbp->name;
            }
            $keywords = $tag->Name;
            $description = $tag->Intro;
    }elseif($type == 'author'){
            if ($page=='1') {
                $ThisTitle = $zbp->title.' - '.$zbp->name;
            }else{
                $ThisTitle = $zbp->title.' - '.'第'.$page.'页'.' - '.$zbp->name;
            }
            $keywords = $author->Name;
            $description = $author->Intro;
    }elseif($type == 'article'){
            $ThisTitle = $article->Title.' - '.$article->Category->Name.' - '.$zbp->name;
            $aryTags = array();
            foreach($article->Tags as $key){
                $aryTags[] = $key->Name;
            }
            if(count($aryTags)>0){
                $keywords = implode(',',$aryTags);
            }else{
                $keywords = '';
            }
            $description = preg_replace('/[\r\n\s]+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),100)).'...');
    }elseif($type == 'page'){
            $ThisTitle = $article->Title.' - '.$zbp->name;
            $keywords = '';
            $description = preg_replace('/[\r\n\s]+/', '', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),100)).'...');
    }else {
        if($page>'1'){
            $ThisTitle = $zbp->title.' - '.'第'.$page.'页'.' - '.$zbp->name;
        }else{
            $ThisTitle = $zbp->title.' - '.$zbp->name;
        }
        $keywords = '';
        $description = '';
    }
{/php}
    <title>{$ThisTitle}</title>
{if $keywords}
    <meta name="keywords" content="{$keywords}" />
{/if}
{if $description}
    <meta name="description" content="{$description}"/>
{/if}
    <meta name="generator" content="{$zblogphp}" />
{if $type=='article'}
    <link rel="canonical" href="{$article.Url}"/>
{/if}
    <link rel="stylesheet" rev="stylesheet" href="{$host}zb_users/theme/{$theme}/style/{$style}.css" type="text/css" media="all"/>
    <script src="{$host}zb_system/script/jquery-2.2.4.min.js" type="text/javascript"></script>
    <script src="{$host}zb_system/script/zblogphp.js" type="text/javascript"></script>
    <script src="{$host}zb_system/script/c_html_js_add.php" type="text/javascript"></script>
    <script type="text/javascript" src="{$host}zb_users/theme/{$theme}/script/common.js"></script>
{$header}
{if $type=='index'&&$page=='1'}
    <link rel="alternate" type="application/rss+xml" href="{$feedurl}" title="{$name}" />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="{$host}zb_system/xml-rpc/?rsd" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="{$host}zb_system/xml-rpc/wlwmanifest.xml" />
{/if}
</head>